/* 宠物机器人样式 */
#pet-robot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: var(--font-mono);
}

.robot-container {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 机器人主体 */
.robot-body {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    box-shadow: 0 0 15px var(--accent-color), inset 0 0 10px var(--accent-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    overflow: hidden;
}

/* 机器人头部 */
.robot-head {
    width: 100%;
    height: 40%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 机器人眼睛 */
.robot-eyes {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.robot-eye {
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    animation: blink 3s infinite;
}

/* 机器人显示屏 */
.robot-display {
    width: 100%;
    height: 30%;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.robot-display:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 247, 255, 0.1) 20%, 
        transparent 40%, 
        transparent 60%, 
        rgba(0, 247, 255, 0.1) 80%, 
        transparent 100%);
    animation: scan 2s linear infinite;
}

/* 机器人控制面板 */
.robot-controls {
    width: 100%;
    height: 20%;
    display: flex;
    justify-content: space-between;
}

.robot-button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-color);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.robot-button:nth-child(2) {
    animation: pulse 2s infinite;
}

.robot-button:hover {
    opacity: 1;
    box-shadow: 0 0 10px var(--accent-color);
}

/* 机器人天线 */
.robot-antenna {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px;
    background-color: var(--accent-color);
}

.robot-antenna:before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    animation: pulse 2s infinite;
}

/* 机器人悬浮效果 */
.robot-container {
    animation: hover 3s ease-in-out infinite;
}

/* 机器人状态 */
.robot-body.happy {
    border-color: #00ff41;
    box-shadow: 0 0 20px #00ff41, inset 0 0 10px #00ff41;
}

.robot-body.happy .robot-eye {
    background-color: #00ff41;
    box-shadow: 0 0 10px #00ff41;
}

.robot-body.sleeping {
    border-color: #444;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.3), inset 0 0 5px rgba(0, 247, 255, 0.3);
    opacity: 0.7;
}

.robot-body.sleeping .robot-eye {
    height: 2px;
    border-radius: 1px;
    background-color: #444;
    box-shadow: none;
}

.robot-body.thinking {
    border-color: #ff00ff;
    box-shadow: 0 0 15px #ff00ff, inset 0 0 10px #ff00ff;
}

.robot-body.thinking .robot-eye {
    background-color: #ff00ff;
    box-shadow: 0 0 10px #ff00ff;
    animation: blink 1s infinite;
}

/* 对话气泡 */
.robot-speech-bubble {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 200px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    color: var(--accent-color);
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
    z-index: 1001;
}

.robot-speech-bubble:after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--accent-color);
}

.robot-container:hover .robot-speech-bubble {
    opacity: 1;
    transform: translateY(0);
}

/* 菜单 */
.robot-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 150px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
    z-index: 1001;
}

.robot-container.menu-open .robot-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.menu-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover {
    background-color: rgba(0, 247, 255, 0.2);
}

/* 行走动画 */
@keyframes walk-cycle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.robot-container.walking .robot-body {
    animation: walk-cycle 0.5s infinite;
}

/* 机器人跳跃动画 */
@keyframes jump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.robot-container.jumping {
    animation: jump 0.5s ease-in-out;
}

/* 机器人旋转动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.robot-container.spinning {
    animation: spin 0.8s ease-in-out;
}

/* 思考动画 */
@keyframes thinking {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* 悬浮动画 */
@keyframes hover {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 眼睛闪烁动画 */
@keyframes blink {
    0%, 45%, 55%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% { opacity: 0.7; box-shadow: 0 0 5px var(--accent-color); }
    50% { opacity: 1; box-shadow: 0 0 15px var(--accent-color); }
}

/* 扫描动画 */
@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 彩蛋效果样式 */

/* 黑客模式彩蛋 */
body.hacker-mode {
    animation: glitch 0.3s infinite;
}

.hacker-code-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.code-element {
    position: absolute;
    top: -20px;
    color: #00ff41;
    font-family: var(--font-mono);
    font-size: 14px;
    text-shadow: 0 0 5px #00ff41;
    animation: code-fall linear forwards;
}

@keyframes code-fall {
    0% { top: -20px; opacity: 1; }
    95% { opacity: 1; }
    100% { top: 100vh; opacity: 0; }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* 彩虹模式彩蛋 */
.robot-container.rainbow-mode .robot-body {
    animation: rainbow-border 3s linear infinite;
}

.robot-container.rainbow-mode .robot-eye {
    animation: rainbow-color 3s linear infinite;
}

.rainbow-aura {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 15px;
    z-index: -1;
    animation: rainbow-aura 3s linear infinite;
}

@keyframes rainbow-border {
    0% { border-color: #ff0000; box-shadow: 0 0 15px #ff0000, inset 0 0 10px #ff0000; }
    16.6% { border-color: #ff8800; box-shadow: 0 0 15px #ff8800, inset 0 0 10px #ff8800; }
    33.3% { border-color: #ffff00; box-shadow: 0 0 15px #ffff00, inset 0 0 10px #ffff00; }
    50% { border-color: #00ff00; box-shadow: 0 0 15px #00ff00, inset 0 0 10px #00ff00; }
    66.6% { border-color: #0088ff; box-shadow: 0 0 15px #0088ff, inset 0 0 10px #0088ff; }
    83.3% { border-color: #8800ff; box-shadow: 0 0 15px #8800ff, inset 0 0 10px #8800ff; }
    100% { border-color: #ff0000; box-shadow: 0 0 15px #ff0000, inset 0 0 10px #ff0000; }
}

@keyframes rainbow-color {
    0% { background-color: #ff0000; box-shadow: 0 0 10px #ff0000; }
    16.6% { background-color: #ff8800; box-shadow: 0 0 10px #ff8800; }
    33.3% { background-color: #ffff00; box-shadow: 0 0 10px #ffff00; }
    50% { background-color: #00ff00; box-shadow: 0 0 10px #00ff00; }
    66.6% { background-color: #0088ff; box-shadow: 0 0 10px #0088ff; }
    83.3% { background-color: #8800ff; box-shadow: 0 0 10px #8800ff; }
    100% { background-color: #ff0000; box-shadow: 0 0 10px #ff0000; }
}

@keyframes rainbow-aura {
    0% { box-shadow: 0 0 20px #ff0000; }
    16.6% { box-shadow: 0 0 20px #ff8800; }
    33.3% { box-shadow: 0 0 20px #ffff00; }
    50% { box-shadow: 0 0 20px #00ff00; }
    66.6% { box-shadow: 0 0 20px #0088ff; }
    83.3% { box-shadow: 0 0 20px #8800ff; }
    100% { box-shadow: 0 0 20px #ff0000; }
}

/* 舞蹈模式彩蛋 */
.robot-container.dance-mode {
    animation: none;
}

.robot-container.dance-jump {
    animation: dance-jump 0.5s ease-in-out infinite;
}

.robot-container.dance-spin {
    animation: dance-spin 0.8s linear infinite;
}

.robot-container.dance-shake {
    animation: dance-shake 0.3s linear infinite;
}

.robot-container.dance-bounce {
    animation: dance-bounce 0.5s ease-in-out infinite;
}

@keyframes dance-jump {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

@keyframes dance-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes dance-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes dance-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}